<template>

  <el-dialog title="用户新增" :visible.sync="dialogVisible" @open="openUser" @close="closeUser" width="50%" :close-on-click-modal="false">
    <section>
      <span>这是子页面</span>
      <span>这是子页面</span>
    </section>
    <section>
      <span>这是子页面</span>
      <span>这是子页面</span>
    </section>
    <section>
      <el-input v-model="name" placeholder="" size="normal" clearable></el-input>
      <el-input v-model="name" placeholder="" size="normal" clearable></el-input>
    </section>
    <section>
      <el-input v-model="name" placeholder="" size="normal" clearable></el-input>
      <el-input v-model="name" placeholder="" size="normal" clearable></el-input>
    </section>
    <span slot="footer" class="dialog-footer">
      <el-button @click="dialogVisible = false">取 消</el-button>
      <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
    </span>
  </el-dialog>

</template>

<script>
export default {
  name: "",
  props: {
    //父元素传递的数据
    option: Object,
  },
  data() {
    return {
      name: "",
    };
  },
  computed: {
    dialogVisible: {
      //创建用户弹窗是否显示
      get: function () {
        return this.option.dialogVisible;
      },
      set: function (newValue) {
        this.option.dialogVisible = newValue;
      },
    },
  },
  watch: {},
  methods: {
    openUser() {},
    closeUser() {
      this.$emit("refreshTable");
    },
  },
};
</script>
<style scoped>
</style>

